package summary.language;

/**
 * @AUTHOR LYF
 * @DATE 2022/3/5
 * @VERSION 1.0
 * @DESC
 * 一、类型转换问题
 *
 * 1. 基本数据类型之间的转换
 * 2. 对象引用类型之间的转换
 */
public class TypeCastDemo {
    public static void main(String[] args) {
        //String str = (String) new Object();// class java.lang.Object cannot be cast to class java.lang.String (java.lang.Object and java.lang.String are in module java.base of loader 'bootstrap')
        Object o = new String("hello");
        System.out.println(o.toString());
    }
}
